// module.exports = {
//     page: {
//         name: '每个人每个页面停留时间',
//         data: []
//     }
// }
const statis = require('./statis')
const sheets = [
    {
        collectionType: 'TIMEPOINT',
        statisticMethod: 'MIN',
        topicId: statis.timepointArr,
        name: '首次登陆时间',
    },
    {
        collectionType: 'DURATION',
        statisticMethod: 'SUM',
        topicId: statis.durationArr,
        name: '停留时长',
    },
    {
        collectionType: 'SCORE',
        statisticMethod: 'LIST',
        topicId: statis.examArr,
        name: '答题分数',
    },
]

function submitData() {
    let columnMap = {};
    return function () {
        sheets.forEach(({collectionType,statisticMethod,topicId}, i) => {
            columnMap[i] = {collectionType,statisticMethod,topicId}
        })
        return { columnMap, type: "json" }
    }
}

const addSheet = submitData();

module.exports = {
    jsonData:JSON.stringify(addSheet()),
    dataArr: sheets

}


